package siruna.WE.core;

import java.util.HashMap;
import java.util.LinkedHashMap;

import siruna.WE.core.model.EventList;
import siruna.WE.core.model.FunctionalBlock;
import siruna.WE.core.model.VisualBlock;

public class Widget {

	private LinkedHashMap<String, VisualBlock> visblocks;
	private HashMap<String, EventList> eventlists;
	private int widgetID;
	private HashMap<String, FunctionalBlock> funcblocks;

	public Widget(int widgetID) {
		this.widgetID = widgetID;
	}

	public void setEventlists(HashMap<String, EventList> eventlists) {
		this.eventlists = eventlists;
	}

	public HashMap<String, EventList> getEventlists() {
		return eventlists;
	}

	public void setVisblocks(LinkedHashMap<String, VisualBlock> visblocks) {
		this.visblocks = visblocks;
	}

	public LinkedHashMap<String, VisualBlock> getVisblocks() {
		return visblocks;
	}

	public void setWidgetID(int widgetID) {
		this.widgetID = widgetID;
	}

	public int getWidgetID() {
		return widgetID;
	}

	public void setFunctblocks(HashMap<String, FunctionalBlock> funcblocks) {
		this.funcblocks = funcblocks;

	}
	
	public HashMap<String, FunctionalBlock> getFunctblocks() {
		return funcblocks;

	}

	public void load() {
		for(String s: funcblocks.keySet()){
			funcblocks.get(s).load();
			
		}
	}

	

}
